

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { type App } from 'vue'

// 自定义图标组件
import SvgEleIcon from '@/components/SvgIcon/SvgEleIcon.vue'

/**
 * 全局注册ElementPlus图标
 * <ele-Plus />
 */
export function useElIcon(app: App) {
  // 全局注册ElementPlus图标
  for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    // console.log(8888888, key, component);
    app.component(`ele-${key}`, component);
  }
  app.component('SvgEleIcon', SvgEleIcon); // <svg-icon /> <SvgIcon/>
}
